<template>
<view>
  <view>
    <view :class="formats.bold ? 'ql-active' : ''" class="iconfont icon-zitijiacu" data-name="bold"></view>
  </view>
  <editor
      show-img-size="true"
      show-img-toolbar="true"
      show-img-resize="true"
      id="editor" class="ql-container" @ready="onEditorReady"></editor>
</view>
</template>

<script>
export default {
  data() {
    return {
      readOnly: false,
      formats: {}
    }
  },
  methods:{
    onEditorReady(e){
      console.log(e.target.value, e.detail.value);
    }
  },
  onLoad() {
    uni.loadFontFace({
      family: 'Pacifico',
      source: 'url("https://sungd.github.io/Pacifico.ttf")'
    })
  },
}
</script>

<style scoped>
.box{
  margin:8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #320e0e;
}
</style>
